// 引入初始化样式资源
import '@/styles/common.scss'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersitedstate from 'pinia-plugin-persistedstate' // 导入pinia持久化插件

import App from './App.vue'
import router from './router'

// 导入懒加载插件
import { lazyPlugin } from './directives'
// 导入全局组件插件
import { componentPlugins } from './components'

const app = createApp(App)

const pinia = createPinia()
pinia.use(piniaPluginPersitedstate) // 使用pinia持久化插件

app.use(pinia)
app.use(router)
app.use(lazyPlugin)
app.use(componentPlugins)

app.mount('#app')

